import request from '@/utils/request'

// 获取构筑物展示列表
export function getStructureList() {
  return request({
    url: '/operation/web/operationFacilitySetting/structureList',
    method: 'get'
  })
}

// 获取设施类型下拉列表
export function getFacilityTypeList() {
  return request({
    url: '/operation/web/operationFacilitySetting/facilityTypeList',
    method: 'get'
  })
}

// 查询设施设置列表
export function getFacilityList(params) {
  return request({
    url: '/operation/web/operationFacilitySetting/list',
    method: 'get',
    params
  })
}

// 获取设施设置详细信息
export function getFacilityDetail(facilityId) {
  return request({
    url: `/operation/web/operationFacilitySetting/${facilityId}`,
    method: 'get'
  })
}

// 新增设施设置
export function addFacility(data) {
  return request({
    url: '/operation/web/operationFacilitySetting',
    method: 'post',
    data
  })
}

// 修改设施设置
export function updateFacility(data) {
  return request({
    url: '/operation/web/operationFacilitySetting',
    method: 'put',
    data
  })
}

// 删除设施设置
export function deleteFacility(facilityIds) {
  return request({
    url: `/operation/web/operationFacilitySetting/${facilityIds}`,
    method: 'delete'
  })
}